﻿using CustomModel;
using DeskInterfaceService;
using IDeskService;
using IDeskServiceBLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeskInterfaceBLL
{
    public class ShopBLL: IShopBLL
    {
        private readonly IShopService shopService = new ShopService();
        public List<province> GetProvinceList(out string error)
        {
            return this.shopService.GetProvince(out error);
        }

        /// <summary>
        /// 根据省份id获得城市列表
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public List<city> GetCityByProvinceId(int id, out string error)
        {
            return this.shopService.GetCityByProvinceId(id, out error);
        }

        /// <summary>
        /// 根据城市id获得区县数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public List<area> GetAreaByCityId(int id ,out string error)
        {
            return this.shopService.GetAreaByCityId(id, out error);
        }
        /// <summary>
        /// 注册商铺
        /// </summary>
        /// <param name="provinceid"></param>
        /// <param name="cityid"></param>
        /// <param name="areaid"></param>
        /// <param name="detailaddress"></param>
        /// <param name="realname"></param>
        /// <param name="identity"></param>
        /// <param name="phone"></param>
        /// <param name="email"></param>
        /// <param name="pwd"></param>
        /// <param name="identyzimg"></param>
        /// <param name="identityfimg"></param>
        /// <param name="bussimg"></param>
        /// <param name="shopheaderimg"></param>
        /// <param name="shopinimg"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public bool RegistShop(RegistShopModel model, out string error)
        {
            return this.shopService.RegistShop(model, out error);
        }


        public List<shopinfo> GetShopInfos(int userid, ShopStatusEnum shopStatus, out string error)
        {
            throw new NotImplementedException();
        }
    }
}
